import { createRouter, createWebHashHistory } from 'vue-router'
const Login = () => import(/* webpackChunkName: "group-index" */ '@/views/Login/index.vue')
const page404 = () => import(/* webpackChunkName: "group-index" */ '@/views/404.vue')

import mainRoutes from './main'

const commonRoutes = [
  { path: '/', redirect: { name: 'login' }, hidden: true },
  { path: '/login', name: 'login', component: Login, hidden: true },
  { path: '/404', name: '404', component: page404, hidden: true }
]

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [...commonRoutes, ...mainRoutes]
})

export default router
